//
//  TokenHeaderView.swift
//  GhostWorld
//
//  Created by Kam on 2018/6/18.
//  Copyright © 2018 LKGood. All rights reserved.
//

import UIKit

class TokenHeaderView: UICollectionReusableView {
  
  @IBOutlet private weak var tokenImageView: UIImageView!
  @IBOutlet private weak var countLabel: UILabel!
  
  
  var totalTokenCounts: Int = 0 {
    didSet {
      if totalTokenCounts == 0 {
        tokenImageView.image = UIImage(named: "TokenIconGray")
        countLabel.text = "您还没有狮羊曼尼"
        countLabel.textColor = UIColor(fromRGB: 0x888888)
      } else {
        tokenImageView.image = UIImage(named: "TokenIcon")
        countLabel.text = "\(totalTokenCounts)枚"
        countLabel.textColor = UIColor(fromRGB: 0xEDBF64)
      }
    }
  }
}

extension TokenHeaderView {
  static let defaultHeight: CGFloat = 176
}
